
<template>
    <div>       
        <Row>
            <Col>
                <Row>
                    <h1>平台详情</h1>
                </Row>
                <Row>
                    <Col span="3">
                        <p>今日注册客户数：</p>
                    </Col>
                    <Col span="3">
                        <P v-model="RegisterTodayNumber">{{RegisterTodayNumber}}</P>
                    </Col>
                    <Col span="3">
                        <p>总注册客户数量：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="RegisterTotalNumber">{{RegisterTotalNumber}}</P>
                    </Col> 
                    <Col span="3">
                        <p>今日审核成功用户：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="AuditingTodayNumber">{{AuditingTodayNumber}}</P>
                    </Col> 
                    <Col span="3">
                        <p>总计审核成功：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="AuditingTotalNumber">{{AuditingTotalNumber}}</P>
                    </Col> 
                </Row>
                <Row>
                    <h1>招商统计</h1>
                </Row>
                <Row>
                    <Col span="3">
                        <p>招商总计：</p>
                    </Col>
                    <Col span="3">
                        <P v-model="BusinessTotalNumber">{{BusinessTotalNumber}}</P>
                    </Col>
                    <Col span="3">
                        <p>招商人员总数：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="BusinessPeopleNumber">{{BusinessPeopleNumber}}</P>
                    </Col> 
                    <Col span="3">
                        <p>进账：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="BusinessTotalNumber">{{BusinessTotalNumber}}</P>
                    </Col> 
                </Row>
                <Row>
                    <h1>消费统计</h1>
                </Row>
                <Row>
                    <Col span="3">
                        <p>消费总计：</p>
                    </Col>
                    <Col span="3">
                        <P v-model="CostTotalNumber">{{CostTotalNumber}}</P>
                    </Col>
                    <Col span="3">
                        <p>消费人员总数：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="CostPeopleNumber">{{CostPeopleNumber}}</P>
                    </Col> 
                    <Col span="3">
                        <p>进账：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="CostTotalNumber">{{CostTotalNumber}}</P>
                    </Col> 
                </Row>
                <Row>
                    <h1>提现统计</h1>
                </Row>
                <Row>
                    <Col span="3">
                        <p>今日申请人数：</p>
                    </Col>
                    <Col span="3">
                        <P v-model="ApplyTodayPeopleNumber">{{ApplyTodayPeopleNumber}}</P>
                    </Col>
                    <Col span="3">
                        <p>今日申请金额：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="ApplyTodayGoldNumber">{{ApplyTodayGoldNumber}}</P>
                    </Col> 
                    <Col span="3">
                        <p>今日提现金额：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="WithDrawTodayGoldNumber">{{WithDrawTodayGoldNumber}}</P>
                    </Col> 
                    <Col span="3">
                        <p>总计提现金额：</p>
                    </Col>
                    <Col span="3">
                       <P v-model="WithDrawTotalGoldNumber">{{WithDrawTotalGoldNumber}}</P>
                    </Col> 
                </Row>
            </Col>
        </Row>
    </div>
</template>
<script>
export default {
    data() {
        return {
            RegisterTodayNumber:0,
            RegisterTotalNumber:0,
            AuditingTodayNumber:0,
            AuditingTotalNumber:0,
            BusinessTotalNumber:0,
            BusinessPeopleNumber:0,
            CostTotalNumber:0,
            CostPeopleNumber:0,
            ApplyTodayPeopleNumber:0,
            ApplyTodayGoldNumber:0,
            WithDrawTodayGoldNumber:0,
            WithDrawTotalGoldNumber:0
        };
    },
    mounted(){
        this.getRegister();
        this.getAuditing();
        this.getBusiness();
        this.getCost();
        this.getGoldNumber();
    },
    methods: {
        getRegister(){
            let qs = require('qs');
            this.axios({
                method: "post",
                url: `${this.adminUrl}/getRegisterNumber`,
                //url: `${this.siteUrl}/getInvitation`,
                data: qs.stringify({})
                }).then(response => {
                    if ((response.data.result == 200)) {
                        this.RegisterTodayNumber = response.data.data.num;
                        this.RegisterTotalNumber = response.data.data.total;
                    }else{
                        alert("请求失败");
                    }
                }).catch(err =>{
                    console.log(err);
            });
        },
        getAuditing(){
            let qs = require('qs');
            this.axios({
                method: "post",
                url: `${this.adminUrl}/getAuditingNumber`,
                //url: `${this.siteUrl}/getInvitation`,
                data: qs.stringify({})
                }).then(response => {
                    if ((response.data.result == 200)) {
                        this.AuditingTodayNumber = response.data.data.num;
                        this.AuditingTotalNumber = response.data.data.total;
                    }else{
                        alert("请求失败");
                    }
                }).catch(err =>{
                    console.log(err);
            });
        }, 
        getBusiness(){
            let qs = require('qs');
            this.axios({
                method: "post",
                url: `${this.adminUrl}/getBusinessNumber`,
                //url: `${this.siteUrl}/getInvitation`,
                data: qs.stringify({})
                }).then(response => {
                    if ((response.data.result == 200)) {
                        this.BusinessPeopleNumber = response.data.data.num;
                        this.BusinessTotalNumber = response.data.data.total;
                    }else{
                        alert("请求失败");
                    }
                }).catch(err =>{
                    console.log(err);
            });
        },
        getCost(){
            let qs = require('qs');
            this.axios({
                method: "post",
                url: `${this.adminUrl}/getCostNumber`,
                //url: `${this.siteUrl}/getInvitation`,
                data: qs.stringify({})
                }).then(response => {
                    if ((response.data.result == 200)) {
                        this.CostPeopleNumber = response.data.data.num;
                        this.CostTotalNumber = response.data.data.total;
                    }else{
                        alert("请求失败");
                    }
                }).catch(err =>{
                    console.log(err);
            });
        },
        getGoldNumber(){
            let qs = require('qs');
            this.axios({
                method: "post",
                url: `${this.adminUrl}/getGoldNumber`,
                //url: `${this.siteUrl}/getInvitation`,
                data: qs.stringify({})
                }).then(response => {
                    if ((response.data.result == 200)) {
                        this.ApplyTodayPeopleNumber = response.data.data.ap;
                        this.ApplyTodayGoldNumber = response.data.data.ag;
                        this.WithDrawTodayGoldNumber = response.data.data.wdt;
                        this.WithDrawTotalGoldNumber = response.data.data.total;
                    }else{
                        alert("请求失败");
                    }
                }).catch(err =>{
                    console.log(err);
            });
        }                
    }
};
</script>

   



<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1{
    margin: 10px 0px;
}
p{
    font-size: 16px;
}
</style>
